Supplier Allocation For an Enquiry
Introduction
All Enquiries created on ViSN Platform will undergo a procedure that will assess the supplier's eligibility to service the vehicle that the enquiry is created for.
The allocation is driven based on following inputs and configurables
Entity | Applicability |
---|---|
Service Unit | Enquiries that allow users to select a specific supplier, will be allocated to the designated service unit. Walk-In, Book-In (Without N/w policy), Manual Vor, Web-Link are the enquiries that allow specific selection using the Create-Enquiry wizard. |
Network Policy | The Lease Companies are configured with network policy which is depending on the Vehicle's Age and the Eligibility for warranty period Additionally the network policy can also be created for a specific manufacturer by adding an exception. Although its a manufacturer specific network policy it is referred as exception because the default policy will be considered for all other manufacturers except specific one |
Supplier Proximity | An admin configurable value for a lease company allowing to specify the radius of the supplier identification for a given post code |
Supplier Count Threshold | An admin configurable value that enables to optimize supplier allocation by limiting the number of suppliers assigned to an enquiry. When multiple suppliers are identified within a defined geographic radius, the system prioritizes and allocates the enquiry to the top 'n' number of nearest suppliers, thereby enhancing service delivery and operational efficiency. |
Allocation Type | Automatic : The system lets lease companies send requests to many suppliers and get quotes back to further accept one among them to work on the vehicle --------------------------------------------------------------------------------------------- Manual : The system doesn't offer multiple manual supplier selections currently |
Postcode | postcode that the vehicle is nearby |
Service type | Service that the vehicle is expected to undergo from the specific enquiry, can be one among shown below |
Supplier type | Type of the supplier that the enquiry is preferred to be allocated to, can be one among shown below |
Franchises | Name of the manufacturer that vehicle belongs to |
Automatic Supplier Selection
Automatic allocation involves following steps
- Getting Geo Location Based on PostCode
- Getting Service units in the location's proximity
- Getting Service units offering opted services
- Filter by network policy
- Apply Supplier Count Threshold
Get Geo Location Based on PostCode
we retrieve the precise latitude and longitude coordinates corresponding to the provided postcode as below.- We initially verify if the postcode exists within our internal database to use it.
- In cases where the postcode is not present in our database, we execute an API call to postcode.io to obtain the geo location.
- If the "postcode.io" API fails to locate the specified postcode, we leverage the Google Maps API to acquire the geo location.
- If we fail to get the data through Google Maps, we resort to approximating the geo location by making minor adjustments to the provided postcode.
- We would finally return selective geo location information as below
- longitude : longitude from geo location
- latitude : latitude from geo location
- postcode : Usually its the post code that is used for location fetch, It will be the post code that location belongs to in case if both postcode.io and google-maps failed to locate it and approximate location is used
- source : location from which location data fetched, typically google-maps (or) postcode.io
- State
- Sequence
Get Service Units in post code proximity radius
We retrieve the units within the proximity as below- Build a typesense geo-point filter using latitude and longitude
- Fetch service units based on geo-point filter
- Sort the results based on how distant the supplier garage is from given post code
- Iterate through the sorted results and add calculated distance of the unit from given post code
- Filter the results to include only the units whose distance from post code falls within the proximity
- State
- Sequence
Get Service units offering services
We apply the service type filter for the opted services as below- Get the suppliers from the previous step
- Build filter with the service type chosen while creating enquiry
- Iterate through suppliers received and add the service types offered to them
- Iterate through suppliers and filter them by checking if the enquiry's service type is one among the services offered by the unit.
- State
- Sequence
Filter Units by Network Policy
We retrieve the network policy as below- Get the default network policy configured for the lease company
- Get the vehicle's manufacturer from the vehicle searched for or the new vehicle being added
- Check if there's a manufacturer specific policy available
- Override default policy with manufacturer policy if available
- Based on the vehicle's type and warranty period eligibility get the filters for the suppliers allocation
- Iterate through the suppliers and enqueue the unit for allocation only when unit falls in the chosen filters for the policy.
- State
- Sequence
Apply supplier count threshold
We apply the supplier count threshold as below- Get the number of suppliers per enquiry from the lease company details
- Get the results from previous step after applying all the filters
- If number of suppliers per enquiry is found to be configured for the lease company, pick top n suppliers
- If not found to be configured then use all the suppliers for allocation
- State
- Sequence
Manual Supplier Selection
Manual enquiry creation is done in following scenarios
- A supplier can create an enquiry for a vehicle directly brought to the garage.
- A Head office user, affiliated with a specific supplier group, can initiate service requests on behalf of any supplier within that group. (This feature is particularly useful when multiple suppliers within a group are capable of servicing a specific vehicle, enabling flexible assignment and efficient resource allocation.)
- A lease company can create enquiry through web-link or book-in enquiries by selecting eligible supplier from an approved list
- A lease company can initiate a manual Vehicle Off-Road (VOR) enquiry and select any supplier listed on the platform, regardless of their geographic proximity to the vehicle's location
- Getting Geo Location Based on PostCode
- Getting Service units in the location's proximity
- Getting Service units offering opted services
- Getting Service units that offer the services that are approved by lease
- Filtering the units by Selected Franchises if chosen
Overview
- Upon receiving the user's input of postcode, service type, supplier type and franchises, an API call is made to the getSuppliersFromPostcodeProximity endpoint.
- The first step entails identifying all suppliers located in the proximity of the given postcode within the Algolia.
- In order to accomplish this, we retrieve the precise latitude and longitude coordinates corresponding to the provided postcode.
- To optimize the process, we initially verify if the postcode exists within our internal database. If found, we directly retrieve the associated latitude and longitude from the database.
- In cases where the postcode is not present in our database, we execute an API call to postcode.io to obtain the necessary latitude and longitude data.
- If the "postcode.io" API fails to locate the specified location, we leverage the Google Maps API to acquire the latitude and longitude information.
- If we fail to get the data through Google Maps, we resort to approximating the latitude and longitude by making minor adjustments to the provided postcode.
- With the latitude and longitude successfully obtained, a call is made to Algolia, retrieving all suppliers within the vicinity of the specified postcode.
- Within the Algolia call, we effectively apply the supplier type filter while also ensuring that the supplier is capable of providing services within the given distance.
- Subsequently, we proceed to filter out any service units that have not been approved by the lease company.
- Further, we eliminate any service units that do not offer the specific service types requested by the customer.
- Next step is to append franchise details to the service units.
- Final filter is to eliminate any service units that do not offer the specific franchises requested by the customer.
- Finally, the resulting list of service units meeting all the specified criteria is promptly returned to the client.
Relation between user input and filtering of suppliers
- If the customer selects supplier type as Franchise, then only the Franchise suppliers will be returned.
- If the customer selects supplier type as Independent, then only the Independent suppliers will be returned.
- If the customer selects supplier type as Mobile, then any Independent or Franchise type garage who also offer Mobile services will be returned.
- If the customer chooses 2 service types then only the suppliers who have both the service types will be returned. (This applies only in the case of weblink enquiries, since book-in enquiry only allows one service type at a time).
Get the Geo Location Based on PostCode
we retrieve the precise latitude and longitude coordinates corresponding to the provided postcode as below.- We initially verify if the postcode exists within our internal database to use it.
- In cases where the postcode is not present in our database, we execute an API call to postcode.io to obtain the geo location.
- If the "postcode.io" API fails to locate the specified postcode, we leverage the Google Maps API to acquire the geo location.
- If we fail to get the data through Google Maps, we resort to approximating the geo location by making minor adjustments to the provided postcode.
- We would finally return selective geo location information as below
- longitude : longitude from geo location
- latitude : latitude from geo location
- postcode : Usually its the post code that is used for location fetch, It will be the post code that location belongs to in case if both postcode.io and google-maps failed to locate it and approximate location is used
- source : location from which location data fetched, typically google-maps (or) postcode.io
- State
- Sequence
Get the Service Units in post code proximity radius
We retrieve the units within the proximity as below- Build a typesense geo-point filter using latitude and longitude
- Fetch service units based on geo-point filter
- Sort the results based on how distant the supplier garage is from given post code
- Iterate through the sorted results and add calculated distance of the unit from given post code
- Filter the results to include only the units whose distance from post code falls within the proximity
- State
- Sequence
Get the Service units offering services
We apply the service type filter for the opted services as below- Get the suppliers from the previous step
- Build filter with the service type chosen while creating enquiry
- Iterate through suppliers received and add the service types offered to them
- Iterate through suppliers and filter them by checking if the enquiry's service type is one among the services offered by the unit.
- State
- Sequence
Get the units approved by lease company
We filter the units approved by lease company as below- Get the list of units from the previous step
- Iterate through the units and look for existence of the unit in lease company level (Will Exist when network import is performed against a lease company)
- If exists add enabled services to servicesApproved on the corresponding unit
- Filter and return only the units that has approved services and chosen service is one among the approved services
- State
- Sequence
Get the Service units that are offering franchises
We filter the units offered by franchises as below- Get the list of units from the previous step
- Iterate through the units and add franchises to the unit
- If franchises not exist treat as 'All'
- Filter and return only the units that has franchise of enquiry vehicle Or the units offering All franchises
- State
- Sequence
Get the Mobile Suppliers within the mobile radius
We apply the mobile network coverage as below:- Get units from previous step
- Iterate through the units and do
- Get distance of unit from the post code's geo location
- Get the mobile serving radius of the service unit
- Check if the post code's geo location falls within the mobile coverage area of respective unit
- if postcode's within the mobile coverage area enqueue the enquiry for allocation
- Return the queue of units if mobile filter is active or the units returned from previous step if mobile filter is inactive
- Distance = 80 miles, mobile radius = 100 miles
Since 100 > 80, the mobile network can be considered. - Distance = 100 miles, mobile radius = 100 miles
Since 100 = 100, the mobile network can be considered. - Distance = 110 miles, mobile radius = 100 miles
Since 100 is not greater than or equal to 110, the mobile network cannot be considered.
- State
- Sequence
External APIs used
Status: Accepted
Category: Protected
Authored By: Shubham H on Aug 10, 2023
Revisions
10 Aug, 2023 - Add documentation for get suppliers in post code proximity
06 Dec, 2024 - Update the documentation to include terms used, by Rama
17 Dec, 2024 - Update the documentation to use separate files for individual sections, by Rama
18 Dec, 2024 - Update the documentation to classify allocation as automatic and manual, by Rama
18 Dec, 2024 - Add approved by lease filter and franchise filter selections, by Rama
19 Dec, 2024 - Add Mobile Coverage Area section - VN-12816, by Rama